package com.xc.h05.service.renMengBinService.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xc.h05.entity.ConsultRMB;
import com.xc.h05.mapper.ConsultRMBMapper;
import com.xc.h05.service.renMengBinService.ConsultRMBService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ConsultRMBServiceImpl implements ConsultRMBService {

    @Autowired
    ConsultRMBMapper consultRMBMapper;
    @Override
    public List<ConsultRMB> getConsultListById(int id) {
        List<ConsultRMB> list = consultRMBMapper.getConsultListByConsultTeacherId01(id);
        return list;
    }

    @Override
    public PageInfo<ConsultRMB> selectAll(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<ConsultRMB> list = consultRMBMapper.getConsultList();
        PageInfo<ConsultRMB> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
